Many specifications in telecommunications read "condition A is declared when event Y occurs less than N times in T time periods". Dependent on the particular specification, a sliding window approach may be required.
For instance, ITU-T specification G.775, section 5.5 requires that an alarm indication signal (AIS) defect at 6312 kbit/s be detected when the incoming signal has two or less zeros in a sequence of 3156 bits. In this case, Condition A is "Alarm Indication Signal Detected", event Y is "A zero received in the bit stream", N is 3, and T is 3156 bit periods. This requirement is referred to as J2 Physical AIS throughout the application.
Other similar specifications in G.775 include Section 5.6, which requires that an AIS defect at 32,064 kbit/s be detected when the incoming signal has two or less zeros in a sequence of 1920 bits, and section 5.7 which requires that an AIS defect at 97,728 kbit/s be detected when the incoming signal has two or less zeros in a sequence of 1,152 bits.
Similarly, ATM Forum 6312 Kbps UNI Specification Version 1.0 (af-phy-0029.000) requires that a payload AIS be detected when the incoming frame payload (time slots 1 . . . 96 of the frame) contain 2 or less ZEROS in a sequence of 3072 bits.
The standard way of fully implementing such a specification is to implement a T-bit shift register with an up/down counter. The up/down counter increments each time an event enters the shift register, and decrements each time an event drops out. Thus, the counter holds the count of events currently in the shift register. Whenever the count is less than the given threshold, condition A is declared. This implementation requires a T-bit shift register and a log.sub.2 T bit counter. When T is large (such as 3156 bits for the J2 Physical AIS standard) this method requires a large circuit area, even if a RAM is used to implement the shift register. Many variations on this counter/shift register strategy have been implemented; one such application is disclosed in U.S. Pat. No. 5,343,482, Aug. 30, 1994, entitled "Method and Apparatus for Detecting Pulse Density Violations in T1 Transmission", issued to Penner et al, and commonly owned herewith.
A popular choice for an inexpensive partial implementation of the specification, especially where the specification is vague, is the fixed-window approach. In this approach, a log.sub.2 T-bit counter counts the number of times event Y occurs. At the end of each T time periods, the counter is compared against the threshold, and reset. Whenever the counter is less than the threshold N at the end of the T time period window, condition A is declared. This is an inexpensive solution, but does not detect all cases where a window T bits long contains less than N events.
The multiple event age tracking method described in this application is an extension of the known practice of using a counter to measure the age of an event. This single-event age tracking is used when a designer wishes to declare a condition B when more than T bit periods elapse between occurrences of an event Y. To implement the method, a counter is set up to increment in each time period in which a cycle does not occur, and to reset itself when the event does occur. If the counter exceeds T, then at least T bit periods have elapsed between occurrences of event Y, and condition B is declared.